//
//  UIImage+PYImageManager.h
//  catuncel
//
//  Created by Jim on 2017/10/25.
//  Copyright © 2017年 Jim. All rights reserved.
//

#import <UIKit/UIKit.h>
@interface UIImage (PYImageManager)

- (UIImage *)roundedCornerImageWithImageFrame:(CGRect)imageFrame cornerRadius:(CGFloat)cornerRadius;

- (NSData *)compressToMaxDataSizeKBytes:(CGFloat)maxSize;

- (UIImage *)thumbnailWithImageWithoutScaleToSize:(CGSize)size;

- (UIImage *)imageWithColor:(UIColor *)color;

- (UIImage *)normalizedImage;

- (UIImage *)fixOrientation;

- (UIImage *)cropImage:(CGFloat)factor;

/// 裁剪图片，若图片高大于宽，则取顶部正方形，若宽大于高，则居中裁剪
- (UIImage *)cropImageByWidthAndHeight;

@end
